package com.xinqi.modules.course.clazz.dto.rsp;

import com.xinqi.modules.course.course.constant.CourseConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;

/**
 * 已加入的班级数量-响应对象
 *
 * @author wenjie
 * @date 2023/4/13  19:52
 */
@Data
@Schema(description = "已加入的班级数量-响应")
public class ClassStudentAddedCountResultDTO implements Serializable {

    /**
     * 已经加入的班级数量
     */
    private Integer addedCount;

    /**
     * 总共可加入的班级数量
     */
    private Integer total;

    public static ClassStudentAddedCountResultDTO of(int addedCount) {
        ClassStudentAddedCountResultDTO resultDTO = new ClassStudentAddedCountResultDTO();
        resultDTO.setAddedCount(addedCount);
        resultDTO.setTotal(CourseConstants.ClassCount.STUDENT_ADDED_COUNT);
        return resultDTO;
    }

}
